import java.util.Deque;
import java.util.LinkedList;
import java.util.Queue;

/**
 * Created with IntelliJ IDEA.
 * User: 12629
 * Date: 2021/11/2
 * Time: 11:12
 * Description:
 */
public class TestDemo3 {
    public static void main(String[] args) {
        MyQueue  queue = new MyQueue ();
        queue.offer(1);
        queue.offer(2);
        int ret = queue.poll();//出队【删除】
        System.out.println(ret);
        System.out.println(queue.peek());//得到队头元素 不删除
    }
    public static void main2(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);
        queue.offer(2);
        int ret = queue.poll();//出队【删除】
        System.out.println(ret);
        System.out.println(queue.peek());//得到队头元素 不删除
    }
    public static void main1(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        Deque<Integer> queue2 = new LinkedList<>();
        //可以当做链表  可以当做普通队列  可以当做双端队列
        LinkedList<Integer> linkedList = new LinkedList<>();
    }
}
